package com.appkubes.fintech.admin.application.risk.data.boole.controller;

import com.appkubes.fintech.admin.application.risk.data.boole.service.BooleRiskService;
import com.appkubes.fintech.common.response.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@Api(tags = "布尔风控")
@RestController
@RequestMapping("/risk/boole/")
public class BooleController {

    @Resource
    BooleRiskService booleRiskService;

    @ApiOperation("运营商认证")
    @GetMapping("/checkPhone")
    public Response checkPhone(@RequestParam("userKey") String userKey) {
        return booleRiskService.checkPhone(userKey);
    }

    @ApiOperation("银行卡认证")
    @GetMapping("/checkBank")
    public Response checkBank(@RequestParam("userKey") String userKey) {
        return booleRiskService.checkBank(userKey);
    }


    @ApiOperation("获取前置租赁风险")
    @GetMapping("/getPreRisk")
    public Response getPreRisk(@RequestParam("userKey") String userKey) {
        return booleRiskService.getPreRisk(userKey);
    }




    @ApiOperation("获取阿福防欺诈报告")
    @GetMapping("/getAfuRisk")
    public Response getAFuRisk(@RequestParam("userKey") String userKey) {
        return booleRiskService.getAfuRisk(userKey);
    }

    @ApiOperation("获取预言家报告")
    @GetMapping("/getProphetReport")
    public Response getProphetReport(@RequestParam("userKey") String userKey) {
        return booleRiskService.getProphetReport(userKey);
    }
}
